package gui;

import java.io.BufferedReader;

public class ListenerThread extends Thread {
	private MainForm mainForm = null; 
	private boolean shouldStop = false;
	private BufferedReader in = null;

	@Override
	public void run() {
		while (!shouldStop){
			String line;
			try {
				line = in.readLine();
				System.out.println(line);
				
			} catch (Exception e) {
			}
		}
	}

	public void setShouldStop(){
		shouldStop = true;
	}
	
	public void setMainForm(MainForm mainForm) {
		this.mainForm = mainForm;
	}
	
	public void setIn(BufferedReader in) {
		this.in = in;
	}
}
